package com.netistate.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.netistate.base.BaseDao;
import com.netistate.pojo.ProjectServices;

@Repository
public class ProjectServicesDao extends BaseDao<ProjectServices, Integer>{

	/**
	 * 根据Pid查找所有ProjectServies
	 * @param pid
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public List<ProjectServices> findAllProjectServicesByPid(int pid) {
		
		String hql = "from ProjectServices where projectid=?";
		Query query = getSession().createQuery(hql);
		query.setInteger(0, pid);
		
		return query.list();
	}

}
